-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(react): BREAKING CHANGE Upgrade to React 18 #3556
Conversation
78c1408
to
7d5d2e9
Compare
ab7c72d
to
926275a
Compare
@@ -289,6 +289,7 @@ describe('elements/content-sharing/SharingModal', () => { | |||
expect(wrapper.exists(LoadingIndicator)).toBe(true); | |||
|
|||
wrapper.update(); | |||
console.log(wrapper.debug()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console.log()
Object.defineProperty(global, 'TextEncoder', { | ||
value: util.TextEncoder, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error was thrown and said to add this to the setup
import { boolean } from '@storybook/addon-knobs'; | ||
|
||
import { State, Store } from '@sambego/storybook-state'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both deprecated, removed from all stories
@@ -23,28 +23,9 @@ exports[`components/collapsible/Collapsible should apply buttonProps correctly 1 | |||
/> | |||
</PlainButton> | |||
</div> | |||
<AnimateHeight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated after bumping react-animate-height to 3
import * as React from 'react'; | ||
import { IntlProvider } from 'react-intl'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IntlProvider
is handle via a storybook addon now, removed from all stories
@@ -1,8 +1,7 @@ | |||
// @flow | |||
/* eslint-disable react-hooks/rules-of-hooks */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this to avoid having to capitalize all stories to and keeping this as camelcase
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
act(() => { | ||
wrapper.setState({ approvers: [approver] }); | ||
}); | ||
act(() => { | ||
wrapper.instance().handleApproverSelectorSelect([newApprover]); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they need to be separated
.storybook/preview.tsx
Outdated
@@ -1,12 +1,13 @@ | |||
import React from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint?
package.json
Outdated
"*.js": ["eslint --fix", "git add"], | ||
"*.ts": ["eslint --ext=.ts --fix", "git add"], | ||
"*.tsx": ["eslint --ext=.tsx --fix", "git add"], | ||
"*.js|ts|tsx": ["eslint --fix", "git add"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where did this syntax come from? feel like it's not doing what we think it should
im seeing something like *.{js,ts,tsx}
on the docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didint know that was being used for something, thought it wa s just a label, updated in separate PR for eslint
c9ed99d
to
a7e00bb
Compare
@@ -5,6 +5,8 @@ | |||
*/ | |||
|
|||
import * as React from 'react'; | |||
// TODO switch to createRoot when upgrading to React 18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a ticket to track this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will break on its own when we head to 19
|
||
<Meta of={ContentSharingStories} /> | ||
<Meta /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this doing now if stories is removed?
[BREAKING CHANGES] Upgrade to React 18
BREAKING CHANGE
These are the following changes:
act
comes fromreact
now instead of `react-dom/test-utilsrenderHook
comes from@testing-library/react
instead@testing-library/react-hooks
Checklist